﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <link rel="stylesheet" type="text/css" href="../Portal/icons/font-icons.min.css">
    <link rel="stylesheet" type="text/css" href="../Portal/icons/icons.css">
    <link rel="stylesheet" type="text/css" href="../Portal/layui/css/layui.css">
    <link rel="stylesheet" type="text/css" href="../Portal/layui/css/customer.css">
    <script type="text/javascript" src="../Portal/js/sortjs/Sortable.min.js"></script>
    <!--- 引入代码. -->
    <script src="../Scripts/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="../Portal/layui/layui.js"></script>
    <script src="../Scripts/QueryString.js" type="text/javascript"></script>
    <script src="../Scripts/config.js" type="text/javascript"></script>
    <script src="../Comm/Gener.js" type="text/javascript"></script>
    <script type="text/javascript" src="../Portal/js/vue/vue.js"></script>
    <link rel="stylesheet" href="MyDictFrameWork.css">
    <script src="MyDictMethodDeal.js"></script>
    <title></title>
    <script>
        $(function () {
            if (CustomerNo != "" && CustomerNo != null) {
                html += "\n .sidebar .group .group-items .active{\n background-color: '#5053f1' !important; \n color:'#fff'; \n}";
            }
            var theme = filterXSS(localStorage.getItem("themeColorInfo"));
            if (theme == "" || theme == "undefined" || theme == null) return;
            var data = JSON.parse(theme);
            var styleScope = document.getElementById("theme-data");
            var html = styleScope.innerHTML;
            html += "\n .sidebar .group .group-items .active{\nbackground-color: " + data.selectedMenu + " !important; \n color:'#fff'\n}";
            styleScope.innerHTML = filterXSS(html);
        })
    </script>
    <style>
        [v-cloak] {
            display: none;
           
        }
    </style>
    <style id="theme-data">
    </style>
</head>
<body>
<div id="app" v-cloak>
    <div class="sidebar" :style="sideBarStyle">
        <div class="group" :style="menuHeight(group)" v-for="(group,group_index) in sideBarData" :key="group.No"
             :index="group_index"
             @click="group.open = !group.open">
            <p :title="group.Name">
                <i v-if="group.children.length > 0" class="layui-icon "
                   :class="[group.open ? 'layui-icon-down':'layui-icon-right']"></i>
                <i v-else class="layui-icon layui-icon-subtraction"></i>{{group.Name}}
            </p>
            <div v-show="group.open" class="group-items">
                <div @click.stop="openPage(menu)"
                     :class="{'active':activeItem>-1&&iframes.length> 0 && menu.No === iframes[activeItem].No}"
                     class="item" v-for="(menu,menu_index) in group.children" :key="menu.No" :index="menu_index">
                    <i v-if="menu.Icon" :class="menu.Icon"></i> {{menu.Name}}
                </div>
            </div>
        </div>
    </div>
    <div class="main" :style="mainStyle">
        <div class="tab-page" @click.right="openTabDropdownMenu">
            <div class="tab fixed" @click="activeItem = -1" :class="{'active':-1 === activeItem}">
                <i class="layui-icon layui-icon-home"></i>主页
            </div>
            <div class="tab" :class="{'active':index === activeItem}" @click="activeItem=index"
                 v-for="(item,index) in iframes">
                <i v-if="item.Icon" :class="item.Icon"></i>
                <span>{{item.Name}}</span>
                <i class="layui-icon layui-unselect  layui-tab-close" @click="closeCurrentTabs(index)">ဆ</i>
            </div>
        </div>
        <div class="content" :style="contentStyle">
            <div v-if="activeItem === -1">
                <iframe :src="MyDictUrl" frameborder="0" ref="iframe-home" class="tab-iframe" :style="contentStyle"></iframe>
            </div>
            <div v-show="activeItem === index" v-for="(iframe,index) in iframes">
                <iframe :src="iframe.Docs" frameborder="0" :ref="'iframe-'+index" class="tab-iframe" :style="contentStyle"></iframe>
            </div>
        </div>
        <div class="indicator" @click="sideBarOpen = !sideBarOpen">
            <i class="layui-icon" :class="[sideBarOpen ? 'layui-icon-left': 'layui-icon-right']"></i>
        </div>
    </div>
    <dl v-cloak v-if="tabDropdownVisible" :style="contextMenuStyle" @mouseleave="tabDropdownVisible = false"
        @click.stop="tabDropdownVisible = false">
        <dd @click="closeCurrentTabs(activeItem)">
            <i class="icon-check"></i>关闭当前标签页
        </dd>
        <dd @click="closeOtherTabs"><i class="icon-minus"></i>关闭其它标签页</dd>
        <dd @click="closeAllTabs">
            <i class="icon-exclamation"></i>关闭全部标签页
        </dd>
        <dd @click="reLoadCurrentPage"><i class='icon-reload'></i>刷新</dd>
    </dl>

</div>
<script src="./MyDictFrameWork.js" type="text/javascript"></script>

</body>
</html>
